home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1999 March
/
EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso
/
earcd
/
devel
/
vbcc-ppc
/
doc
/
vc.doc
< prev
next >
Wrap
Text File
|
1999-01-01
|
7KB
|
185 lines
vc - frontend for vbcc (c) in 1995-99 by Volker Barthelmann
INTRODUCTION
vc calls the preprocessor, compiler, assembler and linker.
It should be somewhat Unix cc compatible.
LEGAL
vc is (c) in 1995-99 by Volker Barthelmann. All code is written by me
and may be freely redistributed as long as no modifications are made
and nothing is charged for it.
INSTALLATION
This may change in following versions.
First do not set your stack too low (if your operating systems needs
specifying a stack size). I have not tested how much stack vbcc needs,
some 10k will probably be enough.
At the moment vc calls an external preprocessor, so this one must be
in the path and you probably have to tell the preprocessor the
directories that contain the vbcc includes (and any os includes, if you
have them).
vc needs a config file which tells it how to call all the translation
phases (preprocessor, compiler, assembler, linker). The locations where
vc searches for config files depend on how it was compiled.
On the Amiga it will usually search for "vc.config" in the current
directory, then in ENV: and VBCC:.
On Unix it will search for vc.config in the current directory followed
by /etc/vc.config.
Those locations can be changed by modifying config_names in vc.c and
rebuilding it.
The following options can be used to tell vc how to call the translation
phases (they will usually be contained in the config-file):
-pp=string The preprocessor will be called like in
printf(string,opts,infile,outfile), e.g. the default for vcpp
searching the includes in vinclude: and defining __STDC__)
is "-pp=vcpp -Ivinclude: -D__STDC__=1 %s %s %s"
-cc=string For the compiler. Note that you cannot use vc to call
another compiler than vbcc. But you can call different
versions of vbcc this way, e.g.:
"-cc=vbcca68k -quiet" or
"-cc=vbcci386 -quiet"
-isc=string The same for the scheduler, e.g.:
"-isc=vscppc -quiet %s %s"
Omit, if there is no scheduler for the architecture.
-as=string The same for the assembler, e.g.:
"-as=PhxAss opt NRQBTLPSM quiet %s to %s" or
"-as=as %s -o %s"
-rm=string This is the string for the delete command and takes only
one argument, e.g.
"-rm=delete quiet %s" or
"-rm=rm %s"
-ld=string This is for the linker and takes three arguments. The first
one are the object files (separated by spaces), the second
one the user specified libraries and the last one the name
of the resulting executable.
This has to link with proper startup-code and c-libraries,
e.g.:
"-ld=PhxLnk vlib:startup.o %s %s vlib:vc.lib vlib:amiga.lib
to %s" or
"-ld=ld /usr/lib/crt0.o %s %s -lc -o %s"
-l2=string The same like -ld, but standard-startup and -libraries should
not be linked; used when -nostdlib is specified.
All those strings should tell the command to omit any output apart from
error messages if possible. However for every of those options there
exists one with an additional 'v', i.e. -ppv=, -asv=, etc. which should
produce some output, if possible.
If vc is invoked with the -vv option the verbose commands will be called,
if not the quiet ones will be used.
-ul=string Format for additional libraries specified with -l<lib>.
The result of printf(string,lib) will be added to the
command invoking the linker. Examples are:
"-ul=vlib:%s.lib" or "-ul=-l%s"
CONFIG
vc looks for a config file named 'vc.config' in the current directory
first and then in some other files which have been specified
while compiling vc (on the Amiga this will be ENV:vc.config then
VBCC:vc.config; on Unix systems /etc/vc.config). If it is found it will
be treated as a collection of additional command line arguments. Every
line of the file will be used as one argument. So no quoting shall be
used and furthermore must each argument be placed on its own line.
There should be an example vc.config.
If the _first_ argument of vc is '+file' then <file> will be used as
config-file.
USAGE
vc [options] file1 file2 ...
Processes all files according to their suffix and links all objects
together (unless any of -E, -S, -c is specified). It recognizes the
following file types:
.c C source
.i already preprocessed C source
.scs assembly source to be fed to the scheduler
.asm
.s assembly source
.obj
.o object file
Usually pattern matching is supported - however this depends on the
port and the host system.
The options recognized by vc are:
-v verbose; print all commands
-vv very verbose; display some internals, aswell
-Ox optimization level
-O0 is equivalent to -O=0
-O will activate some optimizations (at the moment -O=991)
-O2 will activate most optimizations (at the moment -O=1023 -schedule)
-O3 will activate all optimizations (at the moment -O=~0 -schedule)
Higher values may or may not activate even more optimizations.
The default is -O=1.
It is also possible to specify an exact value with -O=n.
However, I do not recommend this unless you know exactly what
you are doing.
-o file save target as file (default for executables is a.out)
-E do not compile, save the preprocessed C sources with .i suffix
-S do not assemble, save the compiled files with .asm suffix
-SCS do not schedule, save the compiled files with .scs suffix
-c do not link, save the compiled files with .o suffix
-k keep all intermediate files; by default all generated files
except the source files and the targets are deleted
-Dstr #define a preprocessor symbol, e.g. -DAMIGA or -DCPU=68000;
at the moment this is passed through to the preprocessor
-Ipath add path to the include-search-path;
at the moment this is passed through to the preprocessor
-lulib link with library ulib
-+ allow C++ comments;
when used at the end of the command line on Amiga this option
has to be enclosed in quotation-marks
-nostdlib do not link with standard-startup/libraries; useful only
for people who know what they are doing
-notmpfile do not use names from tmpnam() for temporary files
-schedule do instruction-scheduling
+file use file as config-file
All other options are passed through to vbcc.
Volker Barthelmann volker@vb.franken.de